<%@page import="classeMetier.Scenario"%>
<%@page import="java.io.PrintWriter"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page import="java.sql.ResultSet" %>
<%
classeMetier.ObjectDB db = new classeMetier.ObjectDB();
try{
	db.initialiseConnexion();
	classeMetier.Scenario myScenario = new classeMetier.Scenario(db,
		request.getParameter("scenario_id"),
		request.getParameter("scenario_name"),
		request.getParameter("scenario_comment"),
		request.getParameter("scenario_description"),
		request.getParameter("scenario_business_value"),
		request.getParameter("scenario_developer"),
		request.getParameter("scenario_complexity"),
		request.getParameter("scenario_tested"),
		request.getParameter("scenario_succeed"),
		request.getParameter("scenario_parent") 
	);
	
	if(myScenario.addDB()){ 
		out.print("Le scénario a bien été créé");	
	}else{
		response.setStatus(500,"enregistrement error !");	
	}
	db.closeConnexion();
	
}catch(Exception e){
	response.setStatus(500,"error");	
}
%>
